home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ham Radio 2000
/
Ham Radio 2000.iso
/
ham2000
/
tcp_ip
/
rose_nos
/
rosetech
< prev
Wrap
Text File
|
1992-02-26
|
4KB
|
75 lines
Footnotes (The rest of this is not necessary to support rosenet.doc):
NET's Internals
Incoming frames from a kiss tnc are handled by kiss_recv(interface,bp)
in kiss.c. It calls dump() and then calls ax_recv(interface,bp).
ax_recv() is in ax25.c. It checks for our call in the digipeater fields
and then checks destination field. If it is for us and if it is UI it
checks PID and if IP or ARP sends to ip_route() or arp_input(). If it
is lapb (connected mode) it creates struct ax25_cb *axp if necessary
(cr_ax25(&hdr.source) in ax25subr.c), swaps source and destination
calls, reverses digipeater string and calls lapb_input(). cr_ax25()
sets maxframe and some other things as well as connecting r_upcall to
ax_incom() in ax25.c. This function is what handles "no L3 protocol"
information frames and normally calls either a mailbox session, or if
mbox is not active, a telnet session over ax25.
(In NOS, struct ax25 *addr is not included in the cb so you have to do a
route lookup to get the digipeater list.)
(The following are notes made while inserting the ROSE hook and later
while looking for funny response from ROSE. I am looking to see if we
are responsible for the ROSE switches refusing to re-establish a connec-
tion with the, "*** call cleared, remote station connecting to you",
message if the target IP station's state is disconnected, and the ROSE
switch still thinks it has a link. I think we comply with the AX.25
rules here. They state that the disconnected station should send a DM
in this case. Anyway, here are my notes.)
Lapb_input(axp,cmdrsp,bp) handles incoming frames as follows:
1. If incoming frame is SABM and we are disconnected, it sends response
and calls lapbstate(axp,CONNECTED). lapbstate() calls s_upcall().
Normally this is ax_state(axp,old,new) in ax25cmd.c. This normally only
prints new state to screen if we have a session going.
2. If incoming frame is UA and we are in CONNECTED state, lapb_input
handles this as an exception by calling est_link(axp) which sends anoth-
er SABM. (We should have been in setup). In setup, a UA causes us to
call lapbstate(axp,CONNECTED).
3. If incoming frame is I and we are in DISCONNECTED state we send a DM.
(This is the state of things when we get the funny message.)
4. If incoming frame is I, and we are in CONNECTED state, lapb_input()
calls procdata(axp,bp). procdata(), in lapb.c, extracts PID. If
rose_enable is TRUE, it calls check_rose(axp) which returns TRUE if it
is a rose circuit and the PID is replaced by the PID_IP. (No need for
ARP here.) Then if PID is IP, lapb_input() calls ip_route(bp,0). If we
had not replaced the pid, it would have been PID_NO_L3, which would have
resulted in a call to r_upcall() which is normally ax_incom().
5. An initial incoming I frame with "no L3 PID" pass by ax_incom(). If
it goes to the mailbox subsequent I frames no longer see ax_incom() but
go to mbx_incom() instead (if mbox is enabled).
(In NOS, procdata() calls handleit() where I put check_rose().)
In the interest of speed, check_rose() first checks for a valid number
of "digi" calls in an information frame header. (ROSE can handle one
digi on either end of an AX.25 circuit plus it's address (the "telephone
number" call sign), so the minimum number of "digi" calls is two, the
maximum is four. Check_rose() then looks for the IP station's AX.25
call in it's table. If it finds it, it then checks the neighbor ROSE's
call in either the last "digi" heard, or the next to last. If all
conditions are met, check_rose() returns TRUE, else returns FALSE.
Frames observed going from the ROSE switch to the IP station have the
PID_NO_L3 set (0xf0) and the first information characters are "E",
(0x45), followed by a nul. What my smart monitoring program sees is a
string of information frames containing the single letter "E".
Joe, K5JB